//
//  HZL_RecommendModel.m
//  B_Project
//
//  Created by 胡佳俊 on 15/11/28.
//  Copyright © 2015年 HZL. All rights reserved.
//

#import "HZL_RecommendModel.h"

@implementation HZL_RecommendModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
    if ([key isEqualToString:@"poi"]) {
        //因为在数据中poi有的是字典  有的是字符串   判断poi是字符串还是字典  如果是字典 取key 为name的数据
        
        if ([[value class ] isSubclassOfClass:[NSDictionary class]] )
        {
            self.poiName = value[@"name"];
            self.icon = value[@"icon"];
            self.type = value[@"type"];
            self.poiID = value[@"id"];
        }
        
    }
    
    if ([key isEqualToString:@"id"]) {
        self.notesId = value;
    }
    
    
    if ([key isEqualToString:@"photo_info"]) {
        self.h = value[@"h"];
        self.w = value[@"w"];
    }
    
    
    if ([key isEqualToString:@"location"]) {
        self.latitude = value[@"latitude"];
        self.longitude = value[@"longitude"];
    }
    
    
}


@end
